﻿
using AutoMapper;
using BasehInfoManagerModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BasehInfoManagerViewModel
{

    /// <summary>
    /// automap 配置类
    /// </summary>
    public class MyAutoProfile : Profile
    {
        public MyAutoProfile()
        {
            CreateMap<ModuleDb, ModuleDbView>()
                //把ModuleDb的module_name 赋值给ModuleDbView 的label
                .ForMember(dest => dest.label, opt => opt.MapFrom(src => src.module_name))
                .ReverseMap();
        }
    }
}
